import { BaseWindow } from "../../../component/window/BaseWindow";
import { ILayer } from "../../../mvc/interfaces/ILayer";
import { Language } from "../../../../extend/language/Language";
import { WuXingPlayerInfo } from "../../model/wuxing/WuXingPlayerInfo";
import { ObjCreate } from "../common/ObjCreate";
import { WuXingSkillList } from "./WuXingSkillList";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
//class WuXingSkillChangePanel
    
    export  class WuXingSkillChangePanel extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            setSize(432, 230);
            title = Language.getString(26396);
            return;
        }

        public updateData(arg1: WuXingPlayerInfo): void
        {
            this._skillList.updateData(arg1, true);
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            this._bg = ObjCreate.createBg(0, 0, 400, 155, this);
            this._skillList = new WuXingSkillList(this._bg.width, this._bg.height, 80);
            addChild(this._skillList);
            this._textInfo = ObjCreate.createTextField("", 0, 0, 400, 20, this);
            this._textInfo.htmlText = HTMLUtil.addColor(Language.getStringByParam(26397, HTMLUtil.addColor(30 + Language.getString(26398), "#ffff00")), "#00ff00");
            return;
        }

        protected /* override */ updateSize(): void
        {
            super.updateSize();
            _windowCenter.setSize(this.width - 22, this.height - titleHeight + 9);
            _windowCenter.x = 11;
            _windowCenter.y = 33;
            this._bg.x = _windowCenter.x + 5;
            this._bg.y = _windowCenter.y + 5;
            this._skillList.x = this._bg.x + 5;
            this._skillList.y = this._bg.y + 8;
            this._textInfo.x = (width - this._textInfo.textWidth) / 2;
            this._textInfo.y = 202;
            return;
        }

        /* internal */ /* var */_bg: ScaleBitmap;

        /* internal */ /* var */_skillList: WuXingSkillList;

        /* internal */ /* var */_textInfo: Object /* flash.text.TextField */;
    }
